﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AttachmentFileUpload.aspx.cs"
    Inherits="Common_AttachmentFileUpload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>开放给地信接口的文件上传</title>
    <script type="text/javascript">
        //打开下载页面方法 addby zhongjian 20090923
        function DownLoad(strID) {
            window.location.href = "AppearOtherResouce.aspx?type=fujian&id=" + strID;
        }
        function DownLoad1(strID) {
            window.location.href = "AppearOtherResouce.aspx?type=moban&id=" + strID;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <br />
    <div style="text-align: center;">
        <table style="text-align: left;" class="tab">
            <tr>
                <td colspan="2">
                    <defineControls:CustomGridView ID="CustomGridView1" runat="server" AllowPaging="True"
                        SkinID="List" CustomSortExpression="" AutoGenerateColumns="false" ShowCmpAndCancel="False"
                        ShowItemNumber="false" ShowHideColModel="None" OnOnLoadData="CustomGridView1_OnLoadData"
                        Width="600" AllowOnMouseOverEvent="True" AutoGenerateDeleteConfirm="True" OnRowCreated="CustomGridView1_RowCreated">
                        <PagerSettings Visible="False" />
                        <Columns>
                            <asp:BoundField DataField="序号" HeaderText="序号" />
                            <asp:BoundField DataField="MODULENAME" HeaderText="附件名称"></asp:BoundField>
                            <asp:TemplateField HeaderText="附件模板">
                                <ItemTemplate>
                                    <a href='#' onclick="DownLoad1('<%# DataBinder.Eval(Container.DataItem, "moduleid")%>')">
                                        <%#GetFileName(Container)%></a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="上传材料名称">
                                <ItemTemplate>
                                    <a href="#" style="display: <%# GetFile(Container)%>" onclick="DownLoad('<%# DataBinder.Eval(Container.DataItem, "attachid")%>')">
                                        <%#GetAttName(Container)%></a>
                                    <asp:FileUpload ID="file1" Visible="<%# GetFileAtt(Container)%>" ToolTip='<%# DataBinder.Eval(Container.DataItem,"moduleid")%>'
                                        runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="上传材料编辑">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlDelete" runat="server">删除</asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </defineControls:CustomGridView>
                    <table>
                        <tr>
                            <td>
                                <asp:Button ID="btnUpFile" runat="server" Text="上传材料" OnClick="btnUpFile_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
